package com.sg.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sg.framework.common.annotations.LikeFlag;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 *
 *
 * @author xxx
 */
@Data
@Accessors(chain = true)
@TableName("oms_official_document")  //3-9-01公文表
public class OmsOfficialDocument implements Serializable {

  @Serial
    private static final long serialVersionUID = 1L;

  /**
   * 公文ID
   */
  @TableId(value = "official_document_id", type = IdType.ASSIGN_UUID)
  @NotNull(message = "officialDocumentId不能为空")
  private String officialDocumentId;

  /**
   * 公文文件地址
   */
  @TableField(value = "official_document_file_address")
  @Schema(description = "公文文件地址")
  private String officialDocumentFileAddress;

  /**
   * 接收范围 EVERYONE:所有人 DEPT:部门 PERSON:个人
   */
  @TableField(value = "receive_range")
  @NotNull(message = "接收范围不能为空")
  @Schema(description = "接收范围")
  private String receiveRange;

  /**
   * 是否开启工作任务 TRUE:是 FALSE:否
   */
  @TableField(value = "is_open_work_task")
  @NotNull(message = "是否开启工作任务不能为空")
  @Schema(description = "是否开启工作任务")
  private String isOpenWorkTask;

  /**
   * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
   */
  @TableField(value = "subject_life_cycle")
  @NotNull(message = "主体生命周期不能为空")
  @Schema(description = "主体生命周期")
  private String subjectLifeCycle;

  /**
   * 操作人就职记录ID
   */
  @TableField(value = "operation_induction_id")
  @NotNull(message = "操作人就职记录ID不能为空")
  @Schema(description = "操作人就职记录ID")
  private String operationInductionId;

  /**
   * 创建于空间ID
   */
  @TableField(value = "space_id")
  @NotNull(message = "创建于空间ID不能为空")
  @Schema(description = "创建于空间ID")
  private String spaceId;

  /**
   * 安排的工作任务类型编码 OMS_PROJECT:项目表 OMS_TASK:任务表
   */
  @TableField(value = "arrange_work_task_type_code")
  @Schema(description = "安排的工作任务类型编码")
  private String arrangeWorkTaskTypeCode;

  /**
   * 公文名称
   */
  @TableField(value = "official_document_name")
  @NotNull(message = "公文名称不能为空")
  @Schema(description = "公文名称")
  @LikeFlag(likeType = "LIKE")
  private String officialDocumentName;

  /**
   * 附件地址
   */
  @TableField(value = "annex_address")
  @Schema(description = "附件地址")
  private String annexAddress;

  /**
   * 接收人就职记录ID
   */
  @TableField(value = "receive_induction_id")
  @Schema(description = "接收人就职记录ID")
  private String receiveInductionId;

  /**
   * 工作任务是否已安排 TRUE:是 FALSE:否
   */
  @TableField(value = "work_task_is_arrange")
  @Schema(description = "工作任务是否已安排")
  private String workTaskIsArrange;

  /**
   * 是否存档 TRUE:是 FALSE:否
   */
  @TableField(value = "is_archive")
  @NotNull(message = "是否存档不能为空")
  @Schema(description = "是否存档")
  private String isArchive;

  /**
   * 创建人就职记录ID
   */
  @TableField(value = "create_induction_id")
  @NotNull(message = "创建人就职记录ID不能为空")
  @Schema(description = "创建人就职记录ID")
  private String createInductionId;

  /**
   * 创建于联盟应用ID
   */
  @TableField(value = "app_id")
  @NotNull(message = "创建于联盟应用ID不能为空")
  @Schema(description = "创建于联盟应用ID")
  private String appId;

  /**
   * 安排的工作任务ID
   */
  @TableField(value = "arrange_work_task_id")
  @Schema(description = "安排的工作任务ID")
  private String arrangeWorkTaskId;

  /**
   * 公文编号
   */
  @TableField(value = "official_document_num")
  @Schema(description = "公文编号")
  private String officialDocumentNum;

  /**
   * 提醒层级
   */
  @TableField(value = "remind_level")
  @Schema(description = "提醒层级")
  private Long remindLevel;

  /**
   * 指定工作任务安排人就职记录ID
   */
  @TableField(value = "appoint_work_task_arrange_induction_id")
  @Schema(description = "指定工作任务安排人就职记录ID")
  private String appointWorkTaskArrangeInductionId;

  /**
   * 发布人就职记录ID
   */
  @TableField(value = "release_induction_id")
  @Schema(description = "发布人就职记录ID")
  private String releaseInductionId;

  /**
   * 下发主体ID
   */
  @TableField(value = "issue_subject_id")
  @Schema(description = "下发主体ID")
  private String issueSubjectId;

  /**
   * 存档人就职记录ID
   */
  @TableField(value = "archive_induction_id")
  @Schema(description = "存档人就职记录ID")
  private String archiveInductionId;

  /**
   * 通知类型 OFFICIAL_DOCUMENT:公文 NOTIFICATION:通知
   */
  @TableField(value = "notification_type")
  @NotNull(message = "通知类型不能为空")
  @Schema(description = "通知类型")
  private String notificationType;

  /**
   * 下发主体类型编码 ORG:组织 DEPT:部门
   */
  @TableField(value = "issue_subject_type_code")
  @Schema(description = "下发主体类型编码")
  private String issueSubjectTypeCode;

  /**
   * 通知描述
   */
  @TableField(value = "notification_description")
  @Schema(description = "通知描述")
  private String notificationDescription;

  /**
   * 操作时间
   */
  @TableField(value = "operate_time")
  @NotNull(message = "操作时间不能为空")
  @Schema(description = "操作时间")
  private Date operateTime;

  /**
   * 创建时间
   */
  @TableField(value = "create_time")
  @NotNull(message = "创建时间不能为空")
  @Schema(description = "创建时间")
  private Date createTime;

  /**
   * 发布时间
   */
  @TableField(value = "release_time")
  @Schema(description = "发布时间")
  private Date releaseTime;

  /**
   * 存档时间
   */
  @TableField(value = "archive_time")
  @Schema(description = "存档时间")
  private Date archiveTime;

  /**
   * 是否作废 TRUE:是 FALSE:否
   */
  @TableField(value = "is_valid")
  @NotNull(message = "是否作废不能为空")
  @Schema(description = "是否作废")
  private String isValid;
}
